﻿@using Windvoice.Authorize
@using Windvoice.Library.Mvc
@{
    ViewBag.Title = "Users";
    Layout = "~/Areas/Manage/Views/Shared/_Layout.cshtml";
}

@section headSection{
    <script type="text/javascript">
        $(function () {
            $('a[data-delete]').click(function () { $(this).handledelete('/manage/user/delete') });
        });
    </script>
}

<div class="pagetitle">
    <h2>用户列表</h2>
</div>

<ul class="user-list">
    @foreach (var user in (Windvoice.Authorize.User[])ViewBag.UserList)
    {
        <li>
            <div class="title">
                <a href="@user.Url" title="@user.Url" target="_blank">
                    <img src="@user.PortraitUrl" />
                </a>
            </div>
            <div class="content">
                <div class="username">
                    <h5@(user.Verified?" style=\"color:golden\"":"")>@user.DisplayName</h5>
                    <div class="operate">
                        <a href="/manage/user/edit/@user.ID">编辑</a>
                        <a href="javascript:;" data-delete="@user.ID">删除</a>
                    </div>
                </div>
                <div class="userdesc">
                    @user.UniqueID <br/>
                    @(user.Gender==1?"男":"女") 
                    @(user.Location)
                </div>
            </div>
        </li> 
    }
</ul>

@Html.Pager((int)ViewBag.RecordCount,PageSize:(int)ViewBag.PageSize)